﻿<?xml version="1.0" encoding="utf-8" ?>
<CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <Header>
    <Title>DevExpress MVC CallbackPanel</Title>
    <Author>Žeks</Author>
    <Shortcut>dxcbp</Shortcut>
    <Description></Description>
    <SnippetTypes>
      <SnippetType>Expansion</SnippetType>
    </SnippetTypes>
  </Header>
  <Snippet>
    <Declarations>
      <Literal>
        <ID>name</ID>
        <Default>Name</Default>
      </Literal>
      <Literal>
        <ID>content</ID>
        <Default></Default>
      </Literal>
      <Literal>
        <ID>controller</ID>
        <Default>Controller</Default>
      </Literal>
      <Literal>
        <ID>action</ID>
        <Default>Action</Default>
      </Literal>
      <Literal>
        <ID>beginCallback</ID>
        <Default>Action</Default>
      </Literal>
    </Declarations>
    <Code Language="HTML">
      <![CDATA[
@Html.DevExpress().CallbackPanel(s =>
{
    s.Name = "$name$";
    s.SetContent(() => @Html.RenderPartial("$content$", Model));
    s.CallbackRouteValues = new {Controller = "$controller$", Action = "$action$"};
    s.ClientSideEvents.BeginCallback = "$beginCallback$";
}).GetHtml()
      ]]>
    </Code>
  </Snippet>
</CodeSnippet>